<link href="/css/style.css" rel="stylesheet" />
<div class="header" style="background-color: #FFFFFF;height: 4rem">
    <div class="container" style="padding-top: 0.5rem;padding-bottom: 0.5rem">
        <div class="row">
            <div class="col-sm">
                <ul class="nav nav-pills">
                    <li class="nav-item">
                        <a class="nav-link" href="/">首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/">关于</a>
                    </li>
                <#if (loginUser.username)??>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#">
                    <#if loginUser.avatar?? && loginUser.avatar !=''>
                        <img src="${IMAGE_BASE_URL}${loginUser.avatar}" style="height: 1.9rem;float:left; border-radius: 50%; border: 3px solid #eee; overflow: hidden;">
                    <#else>
                         <img src="/img/default_head.jpg" style="height: 1.9rem;float:left; border-radius: 50%; border: 3px solid #eee; overflow: hidden;">
                    </#if>
                    </a>
                    <div class="dropdown-menu">
                        <a class="dropdown-item" href="/user/toResetPw">设置</a>
                        <a class="dropdown-item" href="/user/logout">注销</a>
                    </div>
                </li>
                <#else>
                    <li class="nav-item" style="margin-right: 1.5rem">
                        <a href="/user/toLogin" class="nav-link" style="color: #969696">登录</a>
                    </li>
                   <li class="nav-item" style="margin-right: 1.5rem">
                       <a href="/user/toRegister" class="nav-link btn btn-outline-primary">注册</a>
                   </li>
                </#if>
                    <li class="nav-item">
                        <a href="/blog/toAdd" class="nav-link btn btn-outline-primary">写文章</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
<hr style="margin-top: 0">
<input type="hidden" id="IMAGE_BASE_URL" value="${IMAGE_BASE_URL}">

